package com.itheima.jsoup;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

public class ItcastSpider {
    public static void main(String[] args)throws Exception {
        String indexUrl="http://www.itcast.cn";

        Document document = Jsoup.connect(indexUrl).get();

        Elements lis = document.select(".ulon>li");
        for(Element li:lis){
            Elements a = li.select("a");
            String text = a.text(); //获取标签当中的内容体
            System.out.println(text);
        }

    }
}
